package com.xiaoke.mapper;

import com.github.pagehelper.Page;
import com.xiaoke.entity.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
@Mapper
public interface GoodsMapper {
    int deleteByPrimaryKey(String id);

    int insert(Goods record);

    int insertSelective(Goods record);

    Goods selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKeyWithBLOBs(Goods record);

    int updateByPrimaryKey(Goods record);

    Page<Goods> findByParams(Map<String, Object> params);

    Map<String,Object> getDetailById(String id);

    List<Map<String,Object>> getByParams(Map<String, Object> params);

    Integer countByShop(String shopId);

    Map<String,Object> countTotalPriceByGoodsPriceIds(String[] id);

    List<Map<String,Object>> findByCategoryAndShop(@Param("categoryId") Integer categoryId,@Param("shopId") String shopId);
}